<?php
/**
 * Created by PhpStorm.
 * User: 式神 (luck48.com)
 * Email: 289650682@qq.com
 * Name: ${NAME}Administrator
 * Date: 2017-03-28
 * Time: 15:13
 */

namespace App\Http\Models;

use Illuminate\Database\Eloquent\Model;

class Attr extends Model
{
    protected $table='attrs';
    protected $primaryKey="id";
    //public $timestamps=false;
    protected $fillable = [
        'name',
        'description',
        'color',
        'image',
        'listsort',
        'cid',
    ];

    /**
     * 获取权限外键
     */
    public function Category()
    {
        return $this->hasMany(Category::class, 'cid','id');
    }
}